﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ServerObjects;
using System.Xml.Serialization;
using System.IO;
using GameObjects;
using System.Data.Entity;

namespace ServerEdit
{
    class Program
    {
        static void Main(string[] args)
        {
            Entities objectContext = new Entities();

            //var f = objectContext.TerrainSet.First().TerrainXml;

            //var xs = new XmlSerializer(typeof(List<TerrainType>));
            //var sr = new StringReader(f);
            
            //var TerrainTypes = (List<TerrainType>)xs.Deserialize(sr);

            //var sw = new StringWriter();

            //TerrainTypes.First(o => o.Name == "Wetland").Colour = "555588";
            //TerrainTypes.First(o => o.Name == "Lake").Colour = "55BBFF";

            //xs.Serialize(sw, TerrainTypes);

            //objectContext.TerrainSet.First().TerrainXml = sw.ToString();
            //objectContext.SaveChanges();

            var gs = new GameServer();


            gs.SaveMap(1);

            
        }
    }
}
